package com.kuangjia.student_ems.service;

import com.kuangjia.student_ems.dto.DepartmentDTO;
import com.kuangjia.student_ems.dto.request.DepartmentRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kuangjia.student_ems.entity.Department;

import java.util.List;
import java.util.Map;

public interface DepartmentService {
    
    DepartmentDTO createDepartment(DepartmentRequest request);
    
    DepartmentDTO updateDepartment(Long departmentId, DepartmentRequest request);
    
    void deleteDepartment(Long departmentId);
    
    DepartmentDTO getDepartmentById(Long departmentId);
    
    List<DepartmentDTO> getAllDepartments();
    
    DepartmentDTO getDepartmentByName(String name);
    
    boolean existsByName(String name);
    
    List<Map<String, Object>> getDepartmentsWithEmployeeCount();
    
    List<DepartmentDTO> searchDepartments(String keyword);
    
    IPage<DepartmentDTO> getDepartmentPage(Page<Department> page, String keyword);
} 